A client process is a process capable of requesting and using a service, and a server process is a process capable of receiving a request for a service and providing that service. A client process requests the services of a server process by, for example, making a function call and passing one or more input parameters to the server process. After performing the requested service, the server process may pass back to the client process one or more output parameters (and/or a return value) reflecting the results of the requested service.
In this specification, the region of computer memory to which a process has access will be called that process's address space. If the client process and server process share a common address space (e.g., if the server process is an in-process server running within the same process as the client process, or if the server process is a local server process running on the same computer system as the client process), they can communicate simply by reading and writing into this common memory. If, on the other hand, the client process and server process do not share a common address space, such as where the server process is a remote server process running on a different computer system than the client process, the processes must communicate by some less direct means.
In order for a client process to request a service from a remote server process that does not share the same address space as the client process, the input parameters required by the server process must be packaged (or “encoded”) in a form that is independent of the address space (i.e., does not rely on portions of encoded parameter data residing in particular locations of memory), and that is both sequential and compact, a process known as “marshalling”. The encoded parameters are communicated to the server process as a packet or a stream, and then decoded at the server process in what essentially amounts to a reversal of the encoding process (called “unmarshalling”) to recreate the input parameters in a form that is available to the server process (i.e., in a form that is dependent on the server process's address space).